package org.example;

import org.apache.shiro.crypto.hash.Md5Hash;
import org.apache.shiro.crypto.hash.SimpleHash;

public class ShiroMD5 {
    public static void main(String[] args) {
        String password = "z3";
        Md5Hash md5Hash = new Md5Hash(password);
        System.out.println("Md5Hash=" + md5Hash);

        Md5Hash Md5HashWithSalt = new Md5Hash(password, "salt");
        System.out.println("Md5HashWithSalt=" + Md5HashWithSalt);

        // multipy encrypt
        Md5Hash md5HashMultiyEncrypt = new Md5Hash(password, "salt", 3);
        System.out.println("md5HashMultiyEncrypt=" + md5HashMultiyEncrypt);

        // encrypt with parent class
        SimpleHash simpleHash = new SimpleHash("MD5", password, "salt", 3);
        System.out.println("simpleHash=" + simpleHash);

    }
}
